﻿namespace = dvg_rheinish_unification

# The conference
dvg_rheinish_unification.10 = {
	type = country_event
	placement = ROOT

	title = dvg_rheinish_unification.10.t
	desc = dvg_rheinish_unification.10.d
	flavor = dvg_rheinish_unification.10.f

	event_image = {
		video = "gfx/event_pictures/unspecific_signed_contract.bk2"
	}

	on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"
	on_opened_soundeffect = "event:/SFX/Events/unspecific/signed_contract"

	icon = "gfx/interface/icons/event_icons/event_portrait.dds"

	duration = 3

	trigger = {
		any_country = {
			ROOT = {
				country_has_primary_culture = cu:rheinish
			}
			OR = {
				country_has_primary_culture = cu:rheinish
				AND = {
					exists = c:OSN
					this = c:OSN
				}
			}
			country_rank < rank_value:major_power
			is_player = no
		}
	}

	option = {
		name = dvg_rheinish_unification.10.a
		default_option = yes

		every_country = {
			if = {
				limit = {
					NOT = { this = ROOT }
					OR = {
						country_has_primary_culture = cu:rheinish
						AND = {
							exists = c:OSN
							this = c:OSN
						}
					}
					country_rank < rank_value:major_power
					is_player = no
				}

				save_scope_as = minor_to_annex
				ROOT = {
					annex = scope:minor_to_annex
				}
			}
		}

		change_tag = CFR
	}
}
